package com.ling.pl.autoproject.definition.entity.model;

import com.ling.pl.core.commons.annotation.Dict;
import com.ling.pl.core.commons.annotation.ModelProperty;

import javax.persistence.Column;

/**
 * 关系属性值映射
 */
public class EntityRelationPropertyMapping {
    @Column(name = "ENTITY_ID", length = 36)
    @ModelProperty(comment = "关系id")
    String relationId;

    @Column(name = "NAME", length = 36)
    @ModelProperty(comment = "中文名称")
    String name;

    @Column(name = "REMARK", length = 500)
    @ModelProperty(comment = "备注")
    String remark;

    @Column(name = "RELATION_TYPE", length = 150)
    @ModelProperty(comment = "关系类型")
    @Dict(code = "builder.entity.relationMappingType", des = "合计,平均,最大值,最小值,计数")
    String relationMappingType;

    @Column(name = "MASTER_ENTITY_PROPERTY", length = 150)
    @ModelProperty(comment = "主实体字段")
    String masterEntityProperty;

    @Column(name = "SLAVE_ENTITY_PROPERTY", length = 150)
    @ModelProperty(comment = "从实体字段")
    String slaveEntityProperty;
}
